package com.manor.paradise.adapter.npcshop

import android.widget.ImageView
import android.widget.TextView
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.manor.paradise.R
import com.manor.paradise.bean.NobleBean
import java.math.BigDecimal

class NobleAdapter(layoutResId: Int, data: MutableList<NobleBean.NobleListBean>?) : BaseQuickAdapter<NobleBean.NobleListBean, BaseViewHolder>
(layoutResId, data) {

    override fun convert(helper: BaseViewHolder, item: NobleBean.NobleListBean) {
        var im_av = helper.getView<ImageView>(R.id.im_av)
        Glide.with(context)
                .load(item.thumb)
                .into(im_av)
        var tv_name = helper.getView<TextView>(R.id.tv_name)
        tv_name.text = item.levelname + " LV" + item.level
        var tv_context = helper.getView<TextView>(R.id.tv_context)
        tv_context.text = "服务费降低至" + item.serviceRate.multiply(BigDecimal("100")) + "%"
    }


}